# @Author   : 懒羊羊
# @File     : two.py
# @Time     : 2024/12/3 19:21
import time

from selenium.webdriver.chrome import webdriver
from selenium import webdriver
from selenium.webdriver.common.by import By

wd = webdriver.Chrome()

wd.get("http://192.168.88.100:8080/index.html#/login?redirect=%2F404")

print(wd.switch_to.alert.text)
wd.switch_to.alert.accept()

wd.find_element(By.NAME, "username").send_keys("admin")
wd.find_element(By.NAME, "password").send_keys("123456")

wd.find_element(By.XPATH, "//div[@class='el-form-item__content']//button").click()

time.sleep(5)

wd.quit()
